﻿<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>@ViewBag.Title - AddressBook</title>
        <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <meta name="viewport" content="width=device-width" />
        @Styles.Render("~/Content/css")
        @Styles.Render("~/Content/themes/base/css")
        @Scripts.Render("~/bundles/modernizr")
    </head>
    <body>
        <header>
            @{
                if (WebSecurity.IsAuthenticated)
                {
                    <div class="">
                        <div class="float-left">
                            <a href="@Url.Action("Index", "Home")" class="site_logo"><span class="logo1">Address</span><span class="logo2">Book</span></a>
                            @if (ViewContext.RouteData.Values["controller"].ToString().ToLower() != "account")
                            {
                                <div class="search_box">
                                    @Html.Label("searchbox", "Search contacts", new {Class = "search_label"})
                                    @Html.TextBox("searchbox")
                                </div>
                            }
                        </div>
                
                        <div class="float-right login_info">
                            <section id="login">
                                @Html.Partial("_LoginPartial")
                            </section>
                        </div>
                    </div>
                }
            }
        </header>
        <div id="body">
            @{
                if (WebSecurity.IsAuthenticated && ViewContext.RouteData.Values["controller"].ToString().ToLower() != "account")
                {
                    @RenderSection("featured", required: false)
                    <div class="left_bar">
                        <input type="button" class="left_bar_element" value="New Contact" onclick="location.href='@Url.Action("Contact", "Home", new { id = -1})'"/>
                    </div>
                }
            }
                <section class="content-wrapper main-content clear-fix">
                @RenderBody()
            </section>
        </div>
        <footer class="contacts_footer">
            <div class="content-wrapper">
                <div class="float-left">
                    <p>&copy; @DateTime.Now.Year - AddressBookDev</p>
                </div>
            </div>
        </footer>
        @Html.Partial("~/Views/Shared/_TemplatesPartial.cshtml")

        @Scripts.Render("~/bundles/jquery")
        @Scripts.Render("~/bundles/jqueryui")
        @RenderSection("scripts", required: false)
        @Scripts.Render("~/appjs")
    </body>
</html>
